s = "apple   pear    banana"
print(" ".join(s.split()))